{% extends '../common/common.html' %}
{% block main %}

<div class="admin-box">
    <div class="crumbs-nav">
        <a href="/admin">管理首页</a> &gt; <span>用户列表</span>
    </div>
    <h2 class="admin-title">用户列表</h2>
    <div class="admin-table">
        <table>
            <tr>
                <th>ID</th>
                <th>昵称</th>
                <th>YD</th>
                <th>是否为管理员</th>
            </tr>
            {% for userList in userList %}
            <tr>
                <td width="120px">{{ userList.id }}</td>
                <td>{{ userList.nickname }}</td>
                <td>{{ userList.YD }}</td>
                <td>
                    {% if userList.isAdmin %}
                    是
                    {% else %}
                    否 <a href="javascript:;" class="Set-admin-btn" set_adminid="{{ userList.id }}">设置为管理员</a>
                    {% endif %}
                </td>
            </tr>
            {% endfor %}
        </table>
    </div>

    {% include '../common/pages.html' %}

</div>
{% endblock %}